﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserDetail.ascx.cs" Inherits="_6i.UserDetail" %>
<div class="header">		
    
		<div id="Banner" align="center" 
            style="background-color: #6699FF; height: 200px; color: #FFFFFF; font-size: x-large; font-weight: bold; text-transform: capitalize; vertical-align: middle;">
            <img alt="Logo" class="style1" src="images/contactslogo.jpg" />
        </div>
        <div id="nav" style="background-color: #3366FF">
		<asp:HyperLink ID="Hyperlink1" NavigateUrl="~/Default.aspx" runat="server">[HOME]</asp:HyperLink>&nbsp;&nbsp;&nbsp;
		<asp:Button ID="btnAddContacat" runat="server" Text="Add Contact" 
			onclick="btnAddContacat_Click" />&nbsp;
        </div>
    </div>
    <div style="padding: 5px; background-color: #6699FF; font-size: x-large; font-weight: bold; color: #FFFFFF;" 
        align="center">View Contact</div>
    <div style="background-color: #6699FF; height: 100%;" align="center">
    <div align="center" style="width: 80%; background-color: #FFFFFF;">

<asp:Label ID="Label1" runat="server" Text="Edit Contact"></asp:Label>
<p>
    &nbsp;</p>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:db_asp6iConnectionString1 %>" 
    DeleteCommand="DELETE FROM [Contacts] WHERE [ID] = @ID" 
    InsertCommand="INSERT INTO [Contacts] ([ID], [Title], [FirstName], [LastName], [MiddleName], [JobTitle], [Company], [Website], [OfficePhone], [HomePhone], [Mobile], [Fax], [Email], [Address], [Street], [City], [Province], [PostalCode]) VALUES (@ID, @Title, @FirstName, @LastName, @MiddleName, @JobTitle, @Company, @Website, @OfficePhone, @HomePhone, @Mobile, @Fax, @Email, @Address, @Street, @City, @Province, @PostalCode)" 
    ProviderName="<%$ ConnectionStrings:db_asp6iConnectionString1.ProviderName %>" 
    SelectCommand="SELECT [ID], [Title], [FirstName], [LastName], [MiddleName], [JobTitle], [Company], [Website], [OfficePhone], [HomePhone], [Mobile], [Fax], [Email], [Address], [Street], [City], [Province], [PostalCode] FROM [Contacts] WHERE ([ID] = @ID)" 
    UpdateCommand="UPDATE [Contacts] SET [Title] = @Title, [FirstName] = @FirstName, [LastName] = @LastName, [MiddleName] = @MiddleName, [JobTitle] = @JobTitle, [Company] = @Company, [Website] = @Website, [OfficePhone] = @OfficePhone, [HomePhone] = @HomePhone, [Mobile] = @Mobile, [Fax] = @Fax, [Email] = @Email, [Address] = @Address, [Street] = @Street, [City] = @City, [Province] = @Province, [PostalCode] = @PostalCode WHERE [ID] = @ID">
    <SelectParameters>
        <asp:SessionParameter Name="ID" SessionField="contactID" Type="Int32" />
    </SelectParameters>
    <DeleteParameters>
        <asp:Parameter Name="ID" Type="Int32" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="ID" Type="Int32" />
        <asp:Parameter Name="Title" Type="String" />
        <asp:Parameter Name="FirstName" Type="String" />
        <asp:Parameter Name="LastName" Type="String" />
        <asp:Parameter Name="MiddleName" Type="String" />
        <asp:Parameter Name="JobTitle" Type="String" />
        <asp:Parameter Name="Company" Type="String" />
        <asp:Parameter Name="Website" Type="String" />
        <asp:Parameter Name="OfficePhone" Type="String" />
        <asp:Parameter Name="HomePhone" Type="String" />
        <asp:Parameter Name="Mobile" Type="String" />
        <asp:Parameter Name="Fax" Type="String" />
        <asp:Parameter Name="Email" Type="String" />
        <asp:Parameter Name="Address" Type="String" />
        <asp:Parameter Name="Street" Type="String" />
        <asp:Parameter Name="City" Type="String" />
        <asp:Parameter Name="Province" Type="String" />
        <asp:Parameter Name="PostalCode" Type="String" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="Title" Type="String" />
        <asp:Parameter Name="FirstName" Type="String" />
        <asp:Parameter Name="LastName" Type="String" />
        <asp:Parameter Name="MiddleName" Type="String" />
        <asp:Parameter Name="JobTitle" Type="String" />
        <asp:Parameter Name="Company" Type="String" />
        <asp:Parameter Name="Website" Type="String" />
        <asp:Parameter Name="OfficePhone" Type="String" />
        <asp:Parameter Name="HomePhone" Type="String" />
        <asp:Parameter Name="Mobile" Type="String" />
        <asp:Parameter Name="Fax" Type="String" />
        <asp:Parameter Name="Email" Type="String" />
        <asp:Parameter Name="Address" Type="String" />
        <asp:Parameter Name="Street" Type="String" />
        <asp:Parameter Name="City" Type="String" />
        <asp:Parameter Name="Province" Type="String" />
        <asp:Parameter Name="PostalCode" Type="String" />
        <asp:Parameter Name="ID" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
    DataKeyNames="ID" DataSourceID="SqlDataSource1" Height="50px" Width="125px">
    <Fields>
        <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" 
            SortExpression="ID" />
        <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
        <asp:BoundField DataField="FirstName" HeaderText="FirstName" 
            SortExpression="FirstName" />
        <asp:BoundField DataField="LastName" HeaderText="LastName" 
            SortExpression="LastName" />
        <asp:BoundField DataField="MiddleName" HeaderText="MiddleName" 
            SortExpression="MiddleName" />
        <asp:BoundField DataField="JobTitle" HeaderText="JobTitle" 
            SortExpression="JobTitle" />
        <asp:BoundField DataField="Company" HeaderText="Company" 
            SortExpression="Company" />
        <asp:BoundField DataField="Website" HeaderText="Website" 
            SortExpression="Website" />
        <asp:BoundField DataField="OfficePhone" HeaderText="OfficePhone" 
            SortExpression="OfficePhone" />
        <asp:BoundField DataField="HomePhone" HeaderText="HomePhone" 
            SortExpression="HomePhone" />
        <asp:BoundField DataField="Mobile" HeaderText="Mobile" 
            SortExpression="Mobile" />
        <asp:BoundField DataField="Fax" HeaderText="Fax" SortExpression="Fax" />
        <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
        <asp:BoundField DataField="Address" HeaderText="Address" 
            SortExpression="Address" />
        <asp:BoundField DataField="Street" HeaderText="Street" 
            SortExpression="Street" />
        <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
        <asp:BoundField DataField="Province" HeaderText="Province" 
            SortExpression="Province" />
        <asp:BoundField DataField="PostalCode" HeaderText="PostalCode" 
            SortExpression="PostalCode" />
        <asp:CommandField ShowEditButton="True" />
    </Fields>
</asp:DetailsView>
</div>
</div>


